Systems such as Personal Computers (PC's) store large amounts of data in mass-storage devices such as hard disk drives (HDD). Mass-storage devices are sector-addressable rather than byte-addressable, since the smallest unit of flash memory that can be read or written is a page that is several 512-byte sectors in size. Flash memory is replacing hard disks and optical disks as the preferred mass-storage medium.
NAND flash memory is a type of flash memory constructed from electrically-erasable programmable read-only memory (EEPROM) cells, which have floating gate transistors. These cells use quantum-mechanical tunnel injection for writing and tunnel release for erasing. NAND flash is non-volatile so it is ideal for portable devices storing data. NAND flash tends to be denser and less expensive than NOR flash memory.
However, NAND flash has limitations. In the flash memory cells, the data is stored in binary terms—as ones (1) and zeros (0). One limitation of NAND flash is that when storing data (writing to flash), the flash can only write from ones (1) to zeros (0). When writing from zeros (0) to ones (1), the flash needs to be erased a “block” at a time. Although the smallest unit for read can be a byte or a word within a page, the smallest unit for erase is a block.
Single Level Cell (SLC) flash and Multi Level Cell (MLC) flash are two types of NAND flash. The erase block size of SLC flash may be 128K+4K bytes while the erase block size of MLC flash may be 256K+8K bytes. Another limitation is that NAND flash memory has a finite number of erase cycles between 10,000 and 100,000, after which the flash wears out and becomes unreliable.
Comparing MLC flash with SLC flash, MLC flash memory has advantages and disadvantages in consumer applications. In the cell technology, SLC flash stores a single bit of data per cell, whereas MLC flash stores two or more bits of data per cell. MLC flash can have twice or more the density of SLC flash with the same technology. But the performance, reliability and durability may decrease for MLC flash.
MLC flash has a higher storage density and is thus better for storing long sequences of data; yet the reliability of MLC is less than that of SLC flash. Data that is changed more frequently is better stored in SLC flash, since SLC is more reliable and rapidly-changing data is more likely to be critical data than slowly changing data. Also, smaller units of data may more easily be aggregated together into SLC than MLC, since SLC often has fewer restrictions on write sequences than does MLC.
One problem that the inventors have noticed with MLC flash systems is write amplification. The number of writes to flash may actually be larger than the number of writes from the host. This is especially true of MLC flash systems that have restrictions on the sequential page writes and single partial write to flash memory. These restrictions may cause additional flash writes that would not be necessary if less restrictive SLC flash memory were used.
For example, a host may over-write 4 pages of data. The four pages of data may be stored in a cache used by the flash drive system that is caching an entire block of pages. Updating the four pages may cause the entire block of 128 pages to be written back to flash memory. Thus a write amplification of 128/4 or 32× occurs, since the 4 pages of host data caused 128 pages to be written to the flash memory.
What is desired is a flash memory system that has mechanisms for reducing write amplification. A flash memory solid-state drive (SSD) with a controller that reduces write amplification is desirable. Using meta-data and command and sector data merging is desirable to reduce write amplification. Also contemporary SSD with PCI-Express interface cannot be directly booted from the current OS kernel without a customized driver, so a proposed method for booting is also described.